SG Window | Window Object |
FindWindow Method |
Properties Methods Events Constants Error Codes |
Returns first descendent window with matching class name and text.
object.FindWindow(className As String, text As String) As Window
Part | Description |
object | The object is expression that evaluates to Window object |
className | Required. String to search inside the window class name. |
text | Required. String to search inside the window text. |
Enumerates all descendent windows and matches specified class name string and text
string against window's class and text. If specified strings are substrings of the
window's class and text, FindWindow returns Window
object attached to the matched window.
Empty string matches always.
Following example shows how to find window created with running application that has string "Basic" in it's text:
Dim w As SGWindow.Window Set w = Find("Basic")
Public Function Find(sText$) As Window Dim w As New SGWindow.Window w.AttachActiveWindow Set Find = w.FindWindow("", sText) End Function